frappe.ui.form.on('indicator_template', {
    refresh: function (frm) {
        frm.add_custom_button(__('下发填报'), function () {
            console.log(frm);
            frm.call('send_out', { throw_if_missing: true })
                .then(r => {
                    if (r.message) {
                        frappe.msgprint({
                            title: __('Notification'),
                            indicator: 'green',
                            message: r.message
                        });                        
                    }
                })
        });
    }
});
